<?php

namespace StudyBuddy;

/**
 * The object of this class represents user
 * that has just joined via the Facebook connect
 * OR Logged in via Facebook connect
 * Technically this user is also just a regular user
 * Usually the next time the same user signs in,
 * he may be represented by a regular User
 *
 * But when the user is represented by the object of
 * this class we know that user is signed in via
 * Facebook connect button
 */
class UserFacebook extends UserExternal {

    /**
     * Return HTML code for avatar image (with full path)
     * @param string $sSize type of avatar: large, medium, tiny
     * @param bool $boolNoCache if true, then add a timestamp to url, making
     * browser not to use cached version and to get a fresh new one
     *
     * @return string the HTML code for image src which actually
     * includes 2 images - an avatar and a tiny facebook icon.
     */
    public function getAvatarImgSrc($sSize = 'medium', $boolNoCache = false) {
        $strAvatar = parent::getAvatarImgSrc($sSize, $boolNoCache);
        $strAvatar .= '<img width="14" height="14" class="iconfb" alt="Facebook Connect User" src="/images/fb-user.gif">';

        return $strAvatar;
    }

}
